<style>
.fui-navbar .buybtn {
    background: red;
}
.fui-btn-c {
    height: auto;
    background: #22ad0c;
    margin: 0.6rem 0.3rem;
    padding: 0.4rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
	justify-content:center;
	box-shadow: 0 8px 6px #1e970a;
    align-items: center;
	color:#fff;
    position: relative;
	border-radius:2rem;
}

.fui-btn-c .icon {
	font-size:1rem;
	padding-right:0.3rem;
	text-align:right;
}

.fui-btn-c .info {
	text-align:left;
    padding-right: 0.2rem;
    font-size: 0.75rem;
}

.fui-btn-c .info p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.weui_cells_radio2 .weui_check:checked + .weui_icon_checked:before {
  color: #09ba07;
}
.jylabel-red {
	border: 1px solid #09ba07;color:#09ba07;background-color:#fff;
}
.jylabel-red.active,.jylabel-red:focus,.jylabel-red:hover,.jylabel-red[href]:focus,.jylabel-red[href]:hover {
	background-color:#09ba07;color:#fff;border: 1px solid #09ba07;
}
.fui-goods-item .detail .price .text {
    color: #09ba07;
}
.fui-goods-group .image.echelon:before{
    background: #09ba07;
}
.fui-tab-scroll .item.on, .fui-tab-scroll .item.on a {
    color: #e1251b;
}
.fui-tab-scroll .item.on:before {background:linear-gradient(to right,rgba(253,21,6,1),rgba(253,21,6,0));}
.fui-header:after {
	border-bottom: 0 solid #D9D9D9;
}
.fui-goods-group .fui-goods-item .img-title{
    margin-top: 2.6rem;
    line-height: 1rem;
    color: #fff;
	background:red;
    padding: 0.2rem;
}
</style>
<div class="fui-page" ng-show="pagedata.isshowarea !=1">
		<div ng-if="!pagedata.showgoodslist" class="topbg" style="position: relative;text-align:center;width:100%;height:8.5rem;background: url('../addons/jy_duoduocai/resource/images/topbg.jpg') no-repeat 50%;background-size: cover;">
			<div class="fui-header" style="background:none;color:#fff">
				<div class="fui-header-left" style="padding-left:0.5rem">
				</div>
				<div class="title bold" style="color:#fff;font-size: 1.3rem;">{{pagedata.pluginset.title || '多多买菜'}}</div>
				<div class="fui-header-right bold" style="padding-right:0.5rem;">
					<i class="icon icon-sousuo1" ng-click="pagedata.showgoodslist=true" style="font-size: 1rem;margin-right:10px"></i>
					<i class="icon icon-fenxiang1" onclick="$('#showsharecover').modal();" style="font-size: 1rem;"></i>
				</div>
			</div>
			<div class="fui-page-title" style="padding-bottom:0;padding-top:2.2rem;font-size:0.7rem;color:#fff">
			收货地址：{{pagedata.pcd.street ||'未获取地址'}}
			 <span ng-click="pagedata.isshowarea=1" style="margin-left:0.5rem">切换<i class="icon icon-more" style="font-size:0.8rem;"></i></span>
			</div>
			<div class="fui-page-image" style="padding:0 1rem">
				<img style="margin:0 auto;width: 100%" ng-click="access_json(pagedata.pluginset.gameurl)" ng-src="{{tomedia(pagedata.pluginset.gameimg) || '../addons/jy_duoduocai/resource/images/gameimg.png'}}"/>
			</div>
		</div>
		<div ng-if="pagedata.showgoodslist" class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">{{pagedata.bankuai.title || '商品列表'}}</div>
				<div class="fui-header-right" style="padding-right:0.5rem;color:#fff">
					<i class="icon jinyunicon icon-fenxiang2" onclick="$('#showsharecover').modal();" style="font-size: 1rem;margin-right:10px"></i>
					<i class="icon jinyunicon icon-liaotian" ng-click="access_json('jy_weishop/member.index/')" style="font-size: 1rem;"></i>
				</div>
			</div>
		</div>
		<div class="fui-content" style="background:#fff">
		<div ng-if="pagedata.showgoodslist" class="fui-searchbar bar jy2-headertop" style="z-index: 0;width:100%;background: #fff;position: relative;">
					<div ng-class="{'searchbar':1,'searchbar-active':pagedata.searchbar ==1}" style="background:none;padding-bottom:0.2rem">
							<div style="position: relative;left:0;top:0;">
								<div class="search-input">
									<i id="searchsub" class="icon icon-sousuo1" ng-click="tool.get_list('jy_weishop/goods.index/getlist/',true)"></i>
									<input type="search" placeholder="请输入商家、商品名称" class="search" ng-model="pagedata.params.keyword" style="text-align: left; color: #999; font-size:0.6rem;background:#f7f7f7;border-radius: 1rem;" />
								</div>
							</div>
					</div>
					<div class="row margin0">
							<div class="jylabels jylabel-f3f3f3" style="background-color:#fff;color:#fb9191" ng-click="pagedata.params={};pagedata.getlist();">重置筛选</div>
							<div ng-repeat="(k,v) in pagedata.searchkeyword" class="jylabels jylabel-f3f3f3" style="background-color:#fff" ng-click="pagedata.params.keyword=v;pagedata.getlist();">{{v}}</div>
					</div>
		</div>
		<div ng-if="!pagedata.showgoodslist && pagedata.pluginset.hdps.length>0" ng-include="sys_html('shop/_hdps')"></div>
		<div class="fui-cell-group fui-cell-click" style="margin-top: 0;">
			<div ng-if="!pagedata.showgoodslist" class="fui-cell" style="border-bottom: 1px solid #ebebeb;">
				<div class="fui-cell-label bold" style="width:auto;font-size:0.8rem">
					<i class="icon icon-baozhengjin" style="color:#22ad0c"></i> 售后无忧
				</div>
				<div class="fui-cell-text red" style="font-size:0.7rem">
				</div>
				<div class="fui-cell-remark noremark" style="color:#888">
					{{pagedata.pluginset.wuyou||'品质保障·极速退款·次日自提'}}
				</div>
			</div>
			<div ng-if="!pagedata.showgoodslist && pagedata.isseckill==1" ng-include="sys_html('shop/_seckillgoods')"></div>
			<div ng-if="!pagedata.showgoodslist" class="fui-cube" ng-click="pagedata.pluginset.getcouponimgurl" style="padding:0;height:auto">
				<img style="height:3rem" ng-src="{{tomedia(pagedata.pluginset.getcouponimg) || '../addons/jy_duoduocai/resource/images/getcouponimg.jpg'}}"/>
			</div>
			<div ng-if="pagedata.pluginset.bankuai2.length>0" class="fui-icon-group noborder col-5 radius"  style="background: #ffffff">
				   <div class="fui-icon-col external" ng-repeat="item in pagedata.pluginset.bankuai2" style="margin:0" ng-click="access_json(item.action)">
						<div class="badge" style="background-color: #f60;"></div>
						<div class="icon icon-green radius" style="height:36px;line-height:36px"><img style="width:36px;height:36px" ng-src="{{tomedia(item.img) || '../core/resource/images/diy/icon/icon_goods.png'}}"/></div>
						<div class="text" style="font-size:0.55rem;">{{item.title}}</div>
				   </div>
			</div>
			<div ng-include="sys_html('shop/_cube')"></div>
			<div class="fui-tab-scroll" ng-if="pagedata.p_group.length>0">
				<div ng-class="{'item':1,'on':pagedata.params.pid==0}" style="height:2rem;line-height:1.5rem"><a href="javascript:;" ng-click="pagedata.params.pid=0;tool.get_list('jy_weishop/goods.index/getlist/order=ishot',true)">热卖推荐</a></div>
				<div ng-repeat="tab in pagedata.p_group" style="height:2rem;line-height:1.5rem" ng-class="{'item':1,'on':pagedata.params.pid==tab.id}"><a href="javascript:;" ng-click="pagedata.params.pid=tab.id;tool.get_list('jy_weishop/goods.index/getlist/pcate='+tab.id,true)">{{tab.title}}</a></div>
				<div ng-if="!pagedata.p_group || pagedata.p_group.length<1" ng-class="{'item':1,'on':pagedata.params.pid==-1}" style="height:2rem;line-height:1.5rem"><a href="javascript:;" ng-click="pagedata.params.pid=-1;tool.get_list('jy_weishop/goods.index/getlist/',true)">其他商品</a></div>
			</div>
			
			<div ng-include="sys_html('shop/_onerowgoods')"></div>
			<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
		</div>
		<div ng-include="sys_html('common/_copyright',true)"></div>
</div>
<div ng-include="sys_html('shop/_footercart')"></div>
</div>
<div id="show_vipcard"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="top:30%;">
			<div class="memlogo-area" style="background:url({{tomedia(pagedata.member.cardbg) || '../core/resource/images/cardbg.png'}}) no-repeat 100%">
                    <div class="memlogo">
                        <img ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/gw-user.png'}}">
                    </div>
                    <div class="name">{{pagedata.member.nickname || '匿名'}}</div>
                    <br>
                    <div class="name">{{pagedata.member.mobile || '无手机号'}}</div>
                    <div class="code">
                        <img ng-src="{{tomedia(pagedata.pluginset.logo) || '../addons/jy_duoduocai/resource/images/logo.png'}}">
                    </div>
                    <div class="bot">
						<img id="barcode"/>
                        <span class="r-f">{{pagedata.member.group}}</span>
                    </div>
            </div>
		</div>
</div>
<div ng-include="sys_html('shop/_area')"></div>
<div ng-include="sys_html('common/_welcomehdp',true)"></div>
<script type="text/javascript">
scope.pagedata.nomore_merch=1;
scope.pagedata.post={'sendtype':1,'dayid':0}
if(scope.main.menus && scope.main.menus.length>0){	
	for(var i=0;i<scope.main.menus.length;i++){
		if(scope.main.menus[i].action=='jy_weishop/member.cart/'){
			scope.main.menus[i].nums=scope.pagedata.cartnums
		}
	}
}
</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>
<script>
scope.pagedata.issocketmsg=false;
scope.pagedata.tanmuspage=0;
scope.pagedata.nowmsgid=0;
scope.pagedata.gettanmus=function() {
	if(!scope.pagedata.issocketmsg){
			scope.get('jy_weishop/get_data/gettanmus/page='+scope.pagedata.tanmuspage,function(res){
						//console.log(res);
						scope.pagedata.tanmus=res.list
						if(scope.pagedata.tanmus.length>0){
							scope.pagedata.tanmuspage++;
							scope.pagedata.up_oldtanmu();
						}
			});
	}
}
//前端先注册以等待接收消息
require(['jinyun_socket'],function(jinyun_socket){	
    jinyun_socket.connect(function(res){
			console.log('加入ID为index的组：');console.log(res);
            jinyun_socket.join('index');//加入ID为1的组
     });	 
    jinyun_socket.onsystem=function(res){
        console.log('收到来自后端的消息：');console.log(res);
		scope.pagedata.issocketmsg=true;
		if(scope.pagedata.pluginset.no_tanmu!=1){
			set_tanmu(res.nickname,res.avatar,res.time);
		}
    }
	//刚进入时；如果没有新订单消息，就弹储备订单消息
	if(scope.pagedata.pluginset.no_tanmu!=1){
		setTimeout(function(){
			scope.pagedata.gettanmus();
		},2000);
	}
});
scope.pagedata.up_oldtanmu=function() {
		if(scope.page.action=='index'){
			var i=scope.pagedata.nowmsgid;
			if(i<scope.pagedata.tanmus.length){
				set_tanmu(scope.pagedata.tanmus[i].nickname,scope.pagedata.tanmus[i].avatar,scope.pagedata.tanmus[i].time);
			}else{
				scope.pagedata.gettanmus();
			}
		}else{
			return false;
		}
}
function set_tanmu(nickname,avatar,time) {
		scope.pagedata.nowmsgid++
		scope.pagedata.showtanmus=true
		scope.$evalAsync(scope.pagedata.showtanmus);
		setTimeout(function(){
			scope.pagedata.transition=true
			scope.$evalAsync(scope.pagedata.transition);	
		},300);
		setTimeout(function(){
			scope.pagedata.showtanmus=false
			scope.pagedata.transition=false
			scope.$evalAsync(scope.pagedata.showtanmus);	
		},2000);
		setTimeout(function(){
			//等待5秒，如果没有新的订单消息，就弹储备订单消息
			scope.pagedata.issocketmsg=scope.pagedata.issocketmsg?scope.pagedata.issocketmsg:false;
			if(!scope.pagedata.issocketmsg && scope.page.action=='index'){
				scope.pagedata.up_oldtanmu();
			}
		},4000);
}
</script>
<!--弹目-->
<div ng-if="pagedata.showtanmus && !pagedata.pluginset.no_tanmu" class="video-sms-pane {{pagedata.transition?'transition':''}}">
		<div class="video-sms-text">
			<image class="video-sms-logo" ng-src="{{pagedata.tanmus[pagedata.nowmsgid].avatar}}"/>
			<span class="overflow-h"> 最新订单来自 {{pagedata.tanmus[pagedata.nowmsgid].nickname}}</span>
		</div>
</div>
<div ng-include="sys_html('common/_coupon',true)"></div>
<div ng-include="sys_html('common/_h5game',true)"></div>
<div ng-include="sys_html('common/_gotop',true)"></div>
<div ng-include="sys_html('common/_share','','','jy_weishop')"></div>
<div ng-include="sys_html('common/_sales','','','jy_weishop')"></div>